<?php
trait Hello
{
    public function sayHelloWorld()
    {
        echo "eello" . $this->getword();
    }
    abstract public function getWord();
}

class myHelloword
{  
    use Hello;
    public $world = "WORLDD!";
    public function getWord()
    {
        echo $this->world;
    }

    public function setWord($world)
    {
        $this->world = $world;
    }
}

$pp = new myHelloword();
//$pp->getWord();